<template>
  <div class="wrapper">
    <swiper :options="swiperOption">
      <!-- slides -->
      <swiper-slide v-for="item of list" :key="item.id">
        <img class="swipter-img" :src="item.imgurl">
      </swiper-slide>
      <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
    <div class="swiper-pagination" slot="pagination"></div>
  </div>

</template>

<script>
  export default {
    name: "HomeSwiper",
    data() {
      return {
        swiperOption: {
          pagination: ".swiper-pagination",
          loop: true
        },
        list: [
          {
            id: '01',
            imgurl: 'http://img5.imgtn.bdimg.com/it/u=66015845,2352227376&fm=15&gp=0.jpg'
          },
          {
            id: '02',
            imgurl: 'http://img.52z.com/upload/news/image/20180821/20180821053656_65816.jpg'
          }
        ]
      }
    }
  }
</script>

<style lang="stylus" scoped>
  /*改变指示点的颜色*/
  .wrapper >>> .swiper-pagination-bullet-active
    background white
  .wrapper
    overflow: hidden
    width: 100%
    height: 0
    padding-bottom: 41.20%
    background: #eee
  .swipter-img
    width 100%
    height 3.3rem


</style>
